<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.staticfile.org/jquery/1.10.2/jquery.min.js">
    </script>
</head>
<body>


<input class="verifyInput" name="verifyInput" placeholder="请输入验证码">


<img class="verifyCode" onclick="changeCode()" src="/auth/getVerifyCode">

</body>
<script>
    function changeCode() {

        var src = " /auth/getVerifyCode?" + new Date().getTime(); //加时间戳，防止浏览器利用缓存

        $('.verifyCode').attr("src", src);                  //jQuery写法

    }
</script>
</html>